package com.artfii;


import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * TEST_SHARDING 表服务层
 * @author lqf
 * @date : 2020-12-08
 */
@Service
@Transactional(propagation = Propagation.REQUIRED)
public class TestShardingService {

    @Resource
    private TestShardingDao testShardingDao;

    public void save(TestSharding m) {
        testShardingDao.save(m);
    }

    public List findListOfStartDate(Date startDate) {
        return testShardingDao.findListOfStartDate(startDate);
    }

    public List findListOfEndDate(Date end) {
        return testShardingDao.findListOfEndDate(end);
    }

    public List findListOfBothDate(Date start, Date end) {
        return testShardingDao.findListOfBothDate(start, end);
    }

    public List findListOfBetweenDate(Date start, Date end) {
        return testShardingDao.findListOfBetweenDate(start, end);
    }


}
